$(document).ready(function(){
	
	$("#rejectReasonDiv").dialog({
		autoOpen: false,
		title:"填写拒绝的理由：",
		modal: true,
		width:200,
		height:150,
		buttons : {
			"确定" : function(){
				$("#operate_"+id).text("处理中...");
				$("#rejectReasonDiv").dialog("close");
				var id = $("#applicationId").val();
				$.post(getRootPath()+ "/MainMenu/fund/rejectAppropriationApplication.htm",{"appropriationApplicationId":id,"reason":$("#reason").val()},function(data){
					if(data.error){
						alert(data.error);
					}else{
						$("#operate_"+id).text("---已拒绝---");
					}
					$("#reason").val("");
				});
			}
		}
	});
	
	$("#applicationTable").load(getRootPath()+ "/MainMenu/fund/appropriationApprovementList.htm",{pageIndex:1});
});

